package cz.wql.dao;

import cz.wql.domain.LinkMan;

import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface LinkManMapper extends Mapper<LinkMan> {
    @Select("SELECT * FROM cst_linkman")
    @Results({
            @Result(property = "custId",column = "lkm_cust_id"),
            @Result(property = "customer",one = @One(select = "cz.wql.dao.CustomerMapper.findcustomerName"),column = "lkm_cust_id")
    })
    public List<LinkMan> pageinfofindlinkmanlist();

    //模糊查询
    @Select("select * from cst_linkman where lkm_name like #{lkmName} ")
    public List<LinkMan>findlinkmanbyname(String lkmName);
}
